<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <!-- import CSS -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>
<div id="app">
    <el-dropdown split-button type="primary" @click="handleClick" @command="handleCommand">
        更多菜单
        <el-dropdown-menu slot="dropdown">
            <el-dropdown-item v-for="name in arr">{{name}}</el-dropdown-item>
        </el-dropdown-menu>
    </el-dropdown>
</div>
</body>
<!--引入Vue框架-->
<script src="https://unpkg.com/vue@2.6.14/dist/vue.min.js"></script>
<!-- import JavaScript -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script>
   let v = new Vue({
        el: '#app',
        data: function() {
            return {
                arr:["刘备","关羽","张飞"]
            }
        },
       methods: {
           handleClick() {
               alert('button click');
           },
           handleCommand(command) {
               this.$message('click on item ' + command);
           }
       }
    })
</script>
</html>